import request from '@/utils/request'

const api_name = '/serviceEdu/video'

export default {

    // 新增课时
    saveVideo(videoInfo){
        return request({
            url: `${api_name}/addVideo`,
            method: 'post',
            data: videoInfo
        })
    },
    // 根据id查询课时信息
    getVideoById(id){
        return request({
            url: `${api_name}/getVideoByid/${id}`,
            method: 'get',
        })
    },
    // 更新课时信息
    updateVideoById(videoInfo){
        return request({
            url: `${api_name}/updateVideoById/${videoInfo.id}`,
            method: 'put',
            data: videoInfo
        })
    },
    // 根据id删除课时
    removeVideoById(id){
        return request({
            url: `${api_name}/removeVideoById/${id}`,
            method: 'delete',
        })
    }

}